<template>
  <el-dialog :title="title" :close-on-click-modal="false" :fullscreen="true" :visible.sync="visible"
    :before-close="cancel" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="50%">

    <div class="block">
    <el-timeline>
    <el-timeline-item timestamp="基本信息" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          <el-col :span="8">
            <el-form-item label="试卷单号" prop="FBILLNO">
              <el-input v-model="dataForm.FBILLNO" disabled readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="出卷日期" prop="FBILLCREDATE">
              <el-input v-model="dataForm.FBILLCREDATE"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="试卷状态">
              <el-select v-model="dataForm.FBILLSTATE" placeholder="请选择">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value" disabled>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="16">
            <el-form-item label="试卷名称" prop="FCATNAME">
              <el-input v-model="dataForm.FCATNAME"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="所属院系" prop="FHOME">
              <el-input v-model="dataForm.FHOME"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="出卷老师" prop="FTEACH">
              <el-input v-model="dataForm.FTEACH"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="有效起日" prop="FBEGDATE">
              <el-input v-model="dataForm.FBEGDATE"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="有效讫日" prop="FENDDATE">
              <el-input v-model="dataForm.FENDDATE"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="16">
            <el-form-item label="备注" prop="FMEMO">
              <el-input v-model="dataForm.FMEMO"  readonly="true"/>
            </el-form-item>
          </el-col>


        </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="添加试题" placement="top">
      <el-card>
        <el-table :data="list2" border stripe>
          <el-table-column label="操作" width="80">
            <template slot-scope="scope">
              <el-button slot="reference" icon="el-icon-delete" style="color: red" @click="shopdate(scope.$index)"
                type="text">删除</el-button>
            </template>
          </el-table-column>
          <el-table-column prop="FENTRYID" label="序号" width="90"></el-table-column>
          <el-table-column prop="FWORKNO" label="题型" width="115"></el-table-column>
          <el-table-column prop="FWORKNAME" label="题目名称"></el-table-column>
          <el-table-column prop="FNUM1" label="分值" width="90"></el-table-column>
          <el-table-column prop="FNUM2" label="分值设置" width="90"></el-table-column>
        </el-table>
        <div class="addbox">
             <el-link icon="el-icon-plus" type="primary" >选择题目</el-link>
             <el-link icon="el-icon-plus" type="primary" >导入题目</el-link>
        </div>
      </el-card>
    </el-timeline-item>
    

    <el-timeline-item timestamp="总分与及格线" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="8">
            <el-form-item label="总分" prop="FNUM2">
              <el-input v-model="dataForm.FNUM2"  readonly="true"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="及格分" prop="FNUM3">
              <el-input v-model="dataForm.FNUM3"  readonly="true"/>
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>
  </el-timeline>

</div>

  </el-dialog>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    components: {  },
    props: {
      formationlist: {
        type: Array,
        default: [],
      },
    },
    data() {
      return {
        textarea: '同意该项目',
        value1: new Date(2024, 12, 2, 12, 0),

        title: "新增",
        insertorupdate: true,
        dataForm: {
          FBILLNO: "K241130001", 
            FBILLCREDATE:"2024-11-29",
            FUSER: "曹操",
            FHOME: "化学与材料科学学院",
            FTEACH:"秦始皇",
            FGROUP: "分析测试中心",
            FBEGDATE: "2024-10-01",
            FENDDATE:"2024-12-31",
            FMEMO: "2024年下使用",
            FCATNAME:"医疗垃圾智慧处理系统",
            FWEEK: "3个月",
            FNUM: 4,
            FNUM2:100,
            FNUM3:60,
            FMONEY: "10万",
            FNOTE:"",
            FBILLTYPE:"研究生",
            FBILLSTATE: "已通过"
        },
        rules: {
          FUSERNUMBER:[
            { required: true, message: '请输入学籍号码', trigger: 'blur' },
          ],
          FUSER: [
            { required: true, message: '请输入申请人员', trigger: 'blur' },
          ],
          FMEMO: [
            { required: true, message: '请输入申请理由', trigger: 'blur' },
          ],
        },
        list: [{  "FENTRYID":1,
                  "FEQUIPNO": "98001",
                  "FEQUIPNAME": "通风柜1-1"
                },
                { "FENTRYID":2,
                  "FEQUIPNO": "98002",
                  "FEQUIPNAME": "通风柜1-2"
                }],
        list2: [{  "FENTRYID":1,
                    "FWORKNO": "单选题",
                    "FWORKNAME": "易燃化学试剂理想存放温度是多少?运行存放最高室温不得超过多少?",
                    "FNUM1":"5",
                    "FNUM2":"5",
                    "FMONEY":"4万",
                    "FMEMO": "环境准备,设备到位,培训完成"
                  },
                  { "FENTRYID":2,
                    "FWORKNO": "单选题",
                    "FWORKNAME": "a射线是下列哪种原子核",
                    "FNUM1":"5",
                    "FNUM2":"5",
                    "FMONEY":"3万",
                    "FMEMO": "开发&测试"
                  },
                  { "FENTRYID":3,
                    "FWORKNO": "单选题",
                    "FWORKNAME": "对于相同厚度的下列物质,对IMeV能力的y涉嫌屏蔽效果好的是",
                    "FNUM1":"5",
                    "FNUM2":"5",
                    "FMONEY":"3万",
                    "FMEMO": "文档编写，系统交付"
                  }],
        list3: [{ "FENTRYID":1,
                  "FWORKNAME": "危化品A",
                  "FCAS": "94-2-3",
                  "FQTY":500,
                  "FUNIT":"ml",
                  "FMEMO": ""
                },
                { "FENTRYID":2,
                  "FWORKNAME": "危化品A",
                  "FCAS": "94-2-3",
                  "FQTY":500,
                  "FUNIT":"ml",
                  "FMEMO": ""
                }],
        list5: [{ "FENTRYID":1,
                  "FWORKNO": "1002",
                  "FWORKNAME": "曹洪",
                  "FUFWORKFLAGNIT":"操作手",
                  "FMEMO": ""
                },
                { "FENTRYID":2,
                  "FWORKNO": "1003",
                  "FWORKNAME": "曹丕",
                  "FUFWORKFLAGNIT":"操作手",
                  "FMEMO": ""
                }],
        loading: false,
        visible: false,

        //所属校区选择数据
        options1: [{
          value: '1',
          label: '申请中'
        }, {
          value: '2',
          label: '已通过'
        }, {
          value: '3',
          label: '已驳回'
        }],

        //所属校区选择数据
        options2: [{
          value: '1',
          label: '本院人员'
        }, {
          value: '2',
          label: '培训人员'
        }, {
          value: '3',
          label: '外来人员'
        }],
        
      };
    },
    created() {
    },
    mounted() { },
    methods: {
      //
      init(FBILLNO) {
        this.dataForm.FBILLNO = FBILLNO;
        if (this.dataForm.FBILLNO) {
          this.title = "修改"
          this.insertorupdate = false;
        }
        else {
          this.title = "新增"
          this.dataForm.FBILLNO = "K" + Math.floor(Math.random() * 10000000) + 1;
          this.insertorupdate = true;
        }
        this.visible = true;
      },
      shoplist(data) {
        data.forEach(item => {
          this.list.push({
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "1"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "曹操"
          },{
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "2"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "刘备"
          })
        });
      },
      //
      cancel() {
        this.list = [];
        this.visible = false;
      },
    },
  };
</script>